//
//  Air_TeJiaCollectionCell.swift
//  旅航ios
//
//  Created by tulip on 2021/4/26.
//

import UIKit

class Air_TeJiaCollectionCell: UICollectionViewCell,UICollectionViewDelegate,UICollectionViewDataSource {
  
    
    @IBOutlet weak var collect: UICollectionView!
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        
        let  layout=HoFlowLayout.init()
        layout.itemSize = CGSize(width: (SCREEN_WIDTH-85)/2.0, height: 65);
        layout.minimumLineSpacing=1;
        layout.minimumInteritemSpacing=5;
        layout.sectionInset=UIEdgeInsets(top: 5, left: 0, bottom: 5, right: 0);
        
        collect.delegate=self
        collect.dataSource=self
        collect.showsHorizontalScrollIndicator=false
        collect.collectionViewLayout=layout;
        collect.register(UINib(nibName: "TejiaTicketCell", bundle: nil), forCellWithReuseIdentifier: "TejiaTicketCell")
        collect.reloadData()
    }
    
    @IBAction func more(_ sender: Any) {
        
    }
    
    
    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        6
    }
    
    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let cell:TejiaTicketCell=collectionView.dequeueReusableCell(withReuseIdentifier: "TejiaTicketCell", for: indexPath) as! TejiaTicketCell
        return cell
    }
    
    
}
